// Boix 2008 WP

// REPLICATION
clear
use "B2008 WP Rep Data.dta"
summarize
display c(k)
mdesc
tabmiss
codebook country
codebook year

// Table 1
// Model 1
probit waronset_updated cwar_updatedt1  avgff_vanhanent1  avgiod_vanhanent1  avgffiod_vanhanent1 loginct1 logpopulation democracyt1 if sovereign==1 & year>1859
codebook year if e(sample)
codebook country if e(sample)
mdesc waronset_updated cwar_updatedt1  avgff_vanhanent1  avgiod_vanhanent1  avgffiod_vanhanent1 loginct1 logpopulation democracyt1

// Model 2
probit waronset_updated cwar_updatedt1  avgff_vanhanent1  avgiod_vanhanent1  avgffiod_vanhanent1 loginct1 logpopulation democracyt1 if sovereign==1 & year>1900
codebook year if e(sample)
codebook country if e(sample)
mdesc waronset_updated cwar_updatedt1  avgff_vanhanent1  avgiod_vanhanent1  avgffiod_vanhanent1 loginct1 logpopulation democracyt1

// Model 3
probit waronset_updated cwar_updatedt1  avgff_vanhanent1  avgiod_vanhanent1  avgffiod_vanhanent1 loginct1 logpopulation democracyt1 if sovereign==1 & year>1944
codebook year if e(sample)
codebook country if e(sample)
mdesc waronset_updated cwar_updatedt1  avgff_vanhanent1  avgiod_vanhanent1  avgffiod_vanhanent1 loginct1 logpopulation democracyt1

// Model 4
probit cwar_updated  avgff_vanhanent1  cwaravgff_vanhanent1 avgiod_vanhanent1  cwaravgiod_vanhanent1 avgffiod_vanhanent1  cwaravgffiod_vanhanent1 loginct1  cwarloginct1 logpopulation  cwarlogpopulationt1 democracyt1 cwardemocracyt1 cwar_updatedt1 if sovereign==1 & year>1859
codebook year if e(sample)
codebook country if e(sample)
mdesc cwar_updated  avgff_vanhanent1  cwaravgff_vanhanent1 avgiod_vanhanent1  cwaravgiod_vanhanent1 avgffiod_vanhanent1  cwaravgffiod_vanhanent1 loginct1  cwarloginct1 logpopulation  cwarlogpopulationt1 democracyt1 cwardemocracyt1 cwar_updatedt1

// Model 5
probit cwar_updated  avgff_vanhanent1  cwaravgff_vanhanent1 avgiod_vanhanent1  cwaravgiod_vanhanent1 avgffiod_vanhanent1  cwaravgffiod_vanhanent1 loginct1  cwarloginct1 logpopulation  cwarlogpopulationt1 democracyt1 cwardemocracyt1 cwar_updatedt1 if sovereign==1 & year>1899
codebook year if e(sample)
codebook country if e(sample)
mdesc cwar_updated  avgff_vanhanent1  cwaravgff_vanhanent1 avgiod_vanhanent1  cwaravgiod_vanhanent1 avgffiod_vanhanent1  cwaravgffiod_vanhanent1 loginct1  cwarloginct1 logpopulation  cwarlogpopulationt1 democracyt1 cwardemocracyt1 cwar_updatedt1

// Model 6
probit cwar_updated  avgff_vanhanent1  cwaravgff_vanhanent1 avgiod_vanhanent1  cwaravgiod_vanhanent1 avgffiod_vanhanent1  cwaravgffiod_vanhanent1 loginct1  cwarloginct1 logpopulation  cwarlogpopulationt1 democracyt1 cwardemocracyt1 cwar_updatedt1 if sovereign==1 & year>1944
codebook year if e(sample)
codebook country if e(sample)
mdesc cwar_updated  avgff_vanhanent1  cwaravgff_vanhanent1 avgiod_vanhanent1  cwaravgiod_vanhanent1 avgffiod_vanhanent1  cwaravgffiod_vanhanent1 loginct1  cwarloginct1 logpopulation  cwarlogpopulationt1 democracyt1 cwardemocracyt1 cwar_updatedt1

// IMPUTATION
clear
use "B2008 WP Imp Data.dta"
summarize

mi import flong, m(imp) id(country year) imp(waronset_updated-dummyrevolutionst1)

// Table 1
// Model 1
mi estimate, esampvaryok post: probit waronset_updated cwar_updatedt1  avgff_vanhanent1  avgiod_vanhanent1  avgffiod_vanhanent1 loginct1 logpopulation democracyt1 if sovereign==1 & year>1859

// Model 2
mi estimate, esampvaryok post: probit waronset_updated cwar_updatedt1  avgff_vanhanent1  avgiod_vanhanent1  avgffiod_vanhanent1 loginct1 logpopulation democracyt1 if sovereign==1 & year>1900

// Model 3
mi estimate, esampvaryok post: probit waronset_updated cwar_updatedt1  avgff_vanhanent1  avgiod_vanhanent1  avgffiod_vanhanent1 loginct1 logpopulation democracyt1 if sovereign==1 & year>1944

// Model 4
mi estimate, esampvaryok post: probit cwar_updated  avgff_vanhanent1  cwaravgff_vanhanent1 avgiod_vanhanent1  cwaravgiod_vanhanent1 avgffiod_vanhanent1  cwaravgffiod_vanhanent1 loginct1  cwarloginct1 logpopulation  cwarlogpopulationt1 democracyt1 cwardemocracyt1 cwar_updatedt1 if sovereign==1 & year>1859

// Model 5
mi estimate, esampvaryok post: probit cwar_updated  avgff_vanhanent1  cwaravgff_vanhanent1 avgiod_vanhanent1  cwaravgiod_vanhanent1 avgffiod_vanhanent1  cwaravgffiod_vanhanent1 loginct1  cwarloginct1 logpopulation  cwarlogpopulationt1 democracyt1 cwardemocracyt1 cwar_updatedt1 if sovereign==1 & year>1899

// Model 6
mi estimate, esampvaryok post: probit cwar_updated  avgff_vanhanent1  cwaravgff_vanhanent1 avgiod_vanhanent1  cwaravgiod_vanhanent1 avgffiod_vanhanent1  cwaravgffiod_vanhanent1 loginct1  cwarloginct1 logpopulation  cwarlogpopulationt1 democracyt1 cwardemocracyt1 cwar_updatedt1 if sovereign==1 & year>1944


